/*
 * BSM6.0
 *
 * Copyright 2012-2013 (C) SINODATA CO., LTD. All Rights Reserved.
 */
package com.sinodata.bsm.inmp.conf;

/**
 * <p>
 * Description: 
 * </p>
 *
 * @author wangyazhou
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-11-17 下午3:56:26          wangyazhou        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
public class PORT {

    private String jobId = "";

    private String nodeId = "";

    private String snmpIndex = ""; //SNMP索引号

    private String snmpDesc = ""; //端口名称

    private String mtu = "";

    private String snmpSpeed = ""; //端口工作速率 

    private String mac = "";

    private String ip = "";

    public String[] toRes() {
        String[] arry = new String[8];

        arry[0] = jobId + "," + nodeId + ",p";
        arry[1] = (snmpDesc == null || snmpDesc.length() == 0) ? "InterFace" + nodeId : snmpDesc;
        arry[2] = snmpDesc;

        arry[3] = snmpIndex;
        arry[4] = mtu;
        arry[5] = snmpSpeed;
        arry[6] = mac;
        arry[7] = ip;

        return arry;
    }

    public String[] toRes(String typeId) {
        String[] arry = new String[9];

        arry[0] = jobId + "," + nodeId + ",p";
        arry[1] = (snmpDesc == null || snmpDesc.length() == 0) ? "InterFace" + nodeId : snmpDesc;
        arry[2] = snmpDesc;
        arry[3] = typeId;

        arry[4] = snmpIndex;
        arry[5] = mtu;
        arry[6] = snmpSpeed;
        arry[7] = mac;
        arry[8] = ip;

        return arry;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public String getSnmpIndex() {
        return snmpIndex;
    }

    public void setSnmpIndex(String snmpIndex) {
        this.snmpIndex = snmpIndex;
    }

    public String getSnmpDesc() {
        return snmpDesc;
    }

    public void setSnmpDesc(String snmpDesc) {
        this.snmpDesc = snmpDesc;
    }

    public String getMtu() {
        return mtu;
    }

    public void setMtu(String mtu) {
        this.mtu = mtu;
    }

    public String getSnmpSpeed() {
        return snmpSpeed;
    }

    public void setSnmpSpeed(String snmpSpeed) {
        this.snmpSpeed = snmpSpeed;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

}
